package com.exartisan.util;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;

import com.exartisan.adapter.CommentsAdapter;
import com.exartisan.bean.FbComment;
import com.exartisan.bean.FbUser;
import com.exartisan.thanhdoanhn.R;

public class CommentsUtil
{

	public static void getCommets(final Context context,
			final OnCommentDialogClickListener listener)
	{
		LayoutInflater inflater = LayoutInflater.from(context);
		View view = inflater.inflate(R.layout.activity_comment, null);
		ListView cmListView = (ListView) view.findViewById(R.id.lv_Comments);

		ArrayList<FbComment> fbcomment;
		CommentsAdapter adapter;

		fbcomment = new ArrayList<FbComment>();

		for (int i = 0; i < 10; i++)
		{
			FbUser fbUser = new FbUser();
			fbUser.setId("1");
			fbUser.setName("Vũ Văn");
			fbUser.setPicture_url("https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRDIONbl8xEQo5_o16nVpO9mUxBo9bPcQ31KgEsflYXAlkl-_al");
			fbcomment.add(new FbComment("232", "halo", "22/09/2013", fbUser, 0));
		}
		// EventAdapter adapter2 = new EventAdapter(this, 1, listEvents);\
		adapter = new CommentsAdapter(fbcomment, context);
		cmListView.setAdapter(adapter);
	}
}
